<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>1.BOM</title>
</head>
<body>

  <!-- 1.如何识别浏览器的类型 -->

  <script>
    // navigator 浏览器
    const ua = navigator.userAgent
    const isChrome = ua.indexOf('Chrome')
    console.log(isChrome);


    // screen 屏幕
    console.log(screen.width);
    console.log(screen.height);

    // location
    console.log(location.href); // 全地址
    console.log(location.protocol); // 协议
    console.log(location.pathname); // 路径
    console.log(location.search); // ?name=zhansan
    console.log(location.hash); // #user

    // URLSearchParams ES6新增
    // 用来解析location.search 转换成对象



    // history
    // history.back()
    // history.forward()


  </script>


  
</body>
</html>